package com.test.demo.service.Imp;

import com.test.demo.dao.DictionaryMapper;
import com.test.demo.model.Dictionary;
import com.test.demo.service.DictionaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * 编写者：郝嘉
 * 编写时间：2019-05-24
 * 模块功能描述：数据表service接口的实现
 */
@Service
public class DictionaryServiceImpl implements DictionaryService {
    @Autowired
    private DictionaryMapper dictionaryMapper;

    @Override
    public Dictionary selectbyPrimaryKey(Integer did) {
        return dictionaryMapper.selectbyPrimaryKey(did);
    }

    @Override
    public List<Dictionary> getDname() {
        System.out.println("执行数据字典类型SQL语句");
        return dictionaryMapper.getDname();
    }

    @Override
    public List<Dictionary> getDis() {
        return dictionaryMapper.getDis();
    }

    @Override
    public int delDictionary(Integer did) {
        return dictionaryMapper.delDictionary(did);
    }

    @Override
    public int insertDictionary(Dictionary dictionarymodel) {
        return dictionaryMapper.insertDictionary(dictionarymodel);
    }

    @Override
    public int updateDictionary(Dictionary dictionarymodel){
        return dictionaryMapper.updateDictionary(dictionarymodel);
    }

    //根据主键查找信息
    @Override
    public Dictionary selectByPrimaryKey2(Integer did) {
        return dictionaryMapper.selectByPrimaryKey2(did);
    }
}
